<?php $this->_extends('../_layouts/default_layout'); ?>
<?php $this->_block('contents'); ?>
<link type="text/css" href="<?=Q::ini('custom_system/base_url')?>css/jq.mselect.css" rel="stylesheet" />
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url')?>js/jq.multiselect.js"></script>
<script type="text/javascript">
$(function(){
	$("#multiselect").multiselect({height: 260, minWidth: 160});
})
</script>
<fieldset><legend>查询条件</legend>
<form method="get" action="">
<?include(Q::ini('custom_system/elements_dir') . 'searchform_element.php');?>
<table class="form_table">
	<tr>
		<th>产品编号</th>
		<td><input type="text" name="product_number" value="<?=isset($_GET['product_number']) ? $_GET['product_number'] : '' ?>" /></td>
	</tr>
	<tr>
		<th>网站/店铺</th>
		<td>
			<select name="shop_id[]" multiple="multiple" id="multiselect">
			<?foreach ($shop_group as $k => $sg):?>
			<optgroup label="<?=$k?>">
			<?foreach ($sg as $s):?>
			<option value="<?=$s['id']?>" <?if (isset($_GET['shop_id']) && is_array($_GET['shop_id']) && in_array($s['id'], $_GET['shop_id'])) echo "selected='selected'"?>><?=$s['name']?></option>
			<?endforeach;?>
			</optgroup>
			<?endforeach;?>
			</select>
		</td>
	</tr>
	<tr>
		<td></td>
		<td><input type="submit" value="查询" class="button" /></td>
	</tr>
</table>
</form>
</fieldset>

<table width="60%" class="list_table" id="list">
<tr>
	<th width="30">ID</th>
	<th width="60">产品编号</th>
	<th>产品名称</th>
	<th width="160">店铺</th>
	<th width="60">最低售价</th>
</tr>
<?foreach ($product_floor_price as $pfp):?>
<tr>
	<td><?=$pfp['id']?></td>
	<td><?=$pfp['product_number']?></td>
	<td align="left"><?=$pfp['product_name']?></td>
	<td><?=$pfp['shop_name']?></td>
	<td><?=$pfp['floor_price']?></td>
</tr>
<?endforeach;?>
</table>
<?=$page;?>
<?php $this->_endblock();?>